using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class Interventional_Treatment_ComplicationMap : EntityTypeConfiguration<Interventional_Treatment_Complication>
    {
        public Interventional_Treatment_ComplicationMap()
        {
            // Primary Key
            this.HasKey(t => t.ITC_ID);

            // Properties
            this.Property(t => t.patient_id)
                .HasMaxLength(20);

            this.Property(t => t.create_by)
                .HasMaxLength(20);

            this.Property(t => t.ITC_Complication)
                .HasMaxLength(50);

            this.Property(t => t.ITC_Dissection_Occurred)
                .HasMaxLength(20);

            this.Property(t => t.ITC_Sandwich_Type)
                .HasMaxLength(20);

            this.Property(t => t.ITC_Treatment_Site_Thrombosis)
                .HasMaxLength(20);

            this.Property(t => t.ITC_TST_Occurred)
                .HasMaxLength(20);

            this.Property(t => t.ITC_Other_complications)
                .HasMaxLength(20);

            this.Property(t => t.ITC_Other_Complication_detail)
                .HasMaxLength(50);

            this.Property(t => t.ITC_Complication_Origin)
                .HasMaxLength(100);

            this.Property(t => t.ITC_Complication_treat)
                .HasMaxLength(100);

            this.Property(t => t.cardiac_Arrhythmias)
                .HasMaxLength(100);

            this.Property(t => t.ITC_IsComplication)
                .IsFixedLength()
                .HasMaxLength(4);

            this.Property(t => t.ITC_Medication)
                .HasMaxLength(100);

            // Table & Column Mappings
            this.ToTable("Interventional_Treatment_Complication");
            this.Property(t => t.ITC_ID).HasColumnName("ITC_ID");
            this.Property(t => t.TTL_ID).HasColumnName("TTL_ID");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.create_time).HasColumnName("create_time");
            this.Property(t => t.create_by).HasColumnName("create_by");
            this.Property(t => t.ITC_Complication).HasColumnName("ITC_Complication");
            this.Property(t => t.ITC_Dissection_Occurred).HasColumnName("ITC_Dissection_Occurred");
            this.Property(t => t.ITC_Sandwich_Type).HasColumnName("ITC_Sandwich_Type");
            this.Property(t => t.ITC_Treatment_Site_Thrombosis).HasColumnName("ITC_Treatment_Site_Thrombosis");
            this.Property(t => t.ITC_TST_Occurred).HasColumnName("ITC_TST_Occurred");
            this.Property(t => t.ITC_Other_complications).HasColumnName("ITC_Other_complications");
            this.Property(t => t.ITC_Other_Complication_detail).HasColumnName("ITC_Other_Complication_detail");
            this.Property(t => t.ITC_Complication_Origin).HasColumnName("ITC_Complication_Origin");
            this.Property(t => t.ITC_Complication_treat).HasColumnName("ITC_Complication_treat");
            this.Property(t => t.cardiac_Arrhythmias).HasColumnName("cardiac_Arrhythmias");
            this.Property(t => t.ITC_IsComplication).HasColumnName("ITC_IsComplication");
            this.Property(t => t.ITC_Medication).HasColumnName("ITC_Medication");
        }
    }
}
